package com.gcmm.controller;


import com.gcmm.websocket.WebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description TODO
 * @Author laz
 * @Date 2023/4/26 16:23
 * @Version 1.0
 */
@RestController
@RequestMapping("/web")
public class TestController {

    @Autowired
    private WebSocket webSocket;

    @RequestMapping("/test")
    public String test(String userId,String msg){
        webSocket.sendOneMessage(userId,msg);
        return "成功";
    }
}

